var __extends =
    (this && this.__extends) ||
    (function () {
      var t = function (e, n) {
        return (t =
          Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array &&
            function (t, e) {
              t.__proto__ = e;
            }) ||
          function (t, e) {
            for (var n in e)
              Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
          })(e, n);
      };
      return function (e, n) {
        function o() {
          this.constructor = e;
        }
        if ("function" != typeof n && null !== n)
          throw new TypeError(
            "Class extends value " + String(n) + " is not a constructor or null"
          );
        t(e, n),
          (e.prototype =
            null === n
              ? Object.create(n)
              : ((o.prototype = n.prototype), new o()));
      };
    })(),
  GameTeamDialog = (function (t) {
    function e() {
      var e = t.call(this) || this;
      return (
        e.btn_fuben_chuangjian.on(
          Laya.Event.CLICK,
          e,
          e.onFuBenChuangJiangDuiWuAction
        ),
        WebSocketService.addListener({
          caller: e,
          code: 1809,
          method: e.onLoadChuangJiangDuiWuData,
        }),
        e
      );
    }
    return (
      __extends(e, t),
      (e.showGameFuBenDialog = function (t) {
        return (
          null == this.gameTeamDialog &&
            ((this.gameTeamDialog = new e()),
            (this.gameTeamDialog.zOrder = 100)),
          this.gameTeamDialog.popup(),
          (this.gameTeamDialog.objDict = t),
          this.gameTeamDialog
        );
      }),
      (e.prototype.onFuBenChuangJiangDuiWuAction = function () {
        var t = this.text_fuben_duiwuName.text,
          e = this.text_fuben_limLvl.text,
          n = this.text_fuben_password.text;
        WebSocketService.send({
          c: 1809,
          d: { fbId: this.objDict.id, teamName: t, lvl: e, password: n },
        });
      }),
      (e.prototype.onLoadChuangJiangDuiWuData = function (t) {
        0 == t.code && (WebSocketService.send({ c: 18041 }), this.close()),
          ToastView.toastView(t.msg);
      }),
      e
    );
  })(ui.battlefield.GameTeamDialogUI);
